package com.cyh.Static_NonStatic;

/**
 * Created by CYH on 2017/11/25 0025.
 */
public class CanInstanceVisitStaticField {


    public static void main(String[] args) {
        new CanInstanceVisitStaticField().run();
    }


    private static int count = 0;

    private void run() {
        CanInstanceVisitStaticField o1 = new CanInstanceVisitStaticField();
        //编译器是允许通过实例来访问静态属性的！
        o1.count++;
        //输出结果是1
        System.out.println(o1.count);

    }


}
